import { type_mongoDB } from '../../../../../../../../../../conect_mongoDB_class_laugh_node';
import { prop_type_target_id } from '../../../../../Classes/cla_req_info_type';
import { spacename_type } from '../../../../../DataDefine/sourceData';
import { req_info_add_type } from '../../../Classes/cla_req_info_add_type';

/**
 * path -->
 *
 * type_user_${cur_info.identity}\_${uni.sort}\_\${uni.id}
 */
export function get_path_db_cur_uni_type(cur_info: req_info_add_type) {
  return `${spacename_type}_${cur_info[prop_type_target_id]}`;
}

/**
 * db -->
 *
 * type_user_${cur_info.identity}\_${uni.sort}\_\${uni.id}
 */
export function get_db_cur_uni_type(cur_info: req_info_add_type) {
  return type_mongoDB.collection(get_path_db_cur_uni_type(cur_info));
}
